﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
using Zosnn.Models;

namespace Zosnn.BLL
{
    public class Class1
    {
        public ClaimsIdentity CreateIdentity(WebUser user, string authenticationType)
        {
            ClaimsIdentity _identity = new ClaimsIdentity(authenticationType);
            _identity.AddClaim(new Claim(ClaimTypes.Name, user.DisplayName));
            _identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, Convert.ToString(user.LoginName)));
            _identity.AddClaim(new Claim("http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider", "ASP.NET Identity"));
            return _identity;
        }
    }
}
